home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / May 90 / MacApp.Tech$ 5⁄25⁄90 / 1330-AdjustSize too early-May90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.3 KB  |  32 lines  |  [TEXT/GEOL]

  1. Item    6705768                         23-May-90        22:23PDT
  2.  
  3. From:   D6020                           Info Research, John MacVeigh,PRT
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    AdjustSize too early!
  8.  
  9. Just got 2.0 Final, and have a question/complaint already!
  10.  
  11. TEvtHandler.DoCreateViews has added a call to AdjustSize at the end of it (i.e.
  12. after all the subviews have been constructed). Problem is, the size of my views
  13. and windows often depend on the size of subviews, and I refer to those subviews
  14. in my CalcMinSize routines with instance fields that haven't been assigned yet.
  15. So things go kablooie with NIL fields. I suppose I could access the views with
  16. FindSubView calls, but that's a big time penalty in a routine like
  17. CalcMinSize... Any suggestions?
  18.  
  19. This resurrects the need for a second "connect things together" pass, after all
  20. views have been created and initialized (which to me simply means setting
  21. instance fields to Nil so that Free can be safely called at any time). Is there
  22. any way to give the views a chance to initialize instance fields _after_ all
  23. subviews are created and linked, but _before_ size and position calls are made?
  24.  
  25. While I'm at it, how about a CalcMaxSize method? I find myself adding these in
  26. order to create windows which can't be resized larger than (one of) the content
  27. view(s).
  28.  
  29. --John MacVeigh
  30.  
  31.  
  32.